﻿using System;
using System.Collections.Generic;
using System.Text;
using Ixtli.Kernel.PAL;

namespace Ixtli.Kernel
{
	public static class KernelEntry
	{
		public static int Enter( IKernelPAL pal )
		{
			PalStartupResult startupResult = pal.Startup( null );
			if( startupResult != PalStartupResult.Success )
			{
				// Failure
				return -1;
			}

			//

			PalShutdownResult shutdownResult = pal.Shutdown( PalShutdownMode.Immediate, null );
			if( shutdownResult != PalShutdownResult.Success )
			{
				// Failure
				return -1;
			}
			return 0;
		}
	}
}
